<DOCTYPE html>
<html>
	<head>
		<title>护理统计</title>
		<meta http-equiv="Content-type" content="text/html; charset=utf-8">
	    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0">
	    <meta name="apple-mobile-web-app-capable" content="yes" />
	    <link rel="stylesheet" type="text/css" href="../../css/jquery.mobile-1.4.0.css" />
	    <link rel="stylesheet" type="text/css" href="../../css/zpdydhl_mobile.css">
	    <link rel="stylesheet" type="text/css" href="../../css/mobiscroll.custom-2.6.2.min.css">
	    <script type="text/javascript" src="../../js/jquery-1.8.3.min.js"></script>
	    <script type="text/javascript" src="../../js/zpdydhl_mobile.js"></script>
	    <script type="text/javascript" src="../../js/mobiscroll.custom-2.6.2.min.js"></script>
        <style type="text/css">
        /*加载loding*/
        .spinner {
          margin: 5px auto 0;
          width: 150px;
          text-align: center;
          position: fixed;
        }

        .spinner > div {
          width: 20px;
          height: 20px;
          background-color: #67CF22;

          border-radius: 100%;
          display: inline-block;
          -webkit-animation: bouncedelay 1.4s infinite ease-in-out;
          animation: bouncedelay 1.4s infinite ease-in-out;
          /* Prevent first frame from flickering when animation starts */
          -webkit-animation-fill-mode: both;
          animation-fill-mode: both;
        }

        .spinner .bounce1 {
          -webkit-animation-delay: -0.32s;
          animation-delay: -0.32s;
        }

        .spinner .bounce2 {
          -webkit-animation-delay: -0.16s;
          animation-delay: -0.16s;
        }

        @-webkit-keyframes bouncedelay {
          0%, 80%, 100% { -webkit-transform: scale(0.0) }
          40% { -webkit-transform: scale(1.0) }
        }

        @keyframes bouncedelay {
          0%, 80%, 100% {
            transform: scale(0.0);
            -webkit-transform: scale(0.0);
          } 40% {
            transform: scale(1.0);
            -webkit-transform: scale(1.0);
          }
        }
        /*end*/
    </style>
	</head>

	<body>
		<div class="ui-page ui-page-theme-c ui-page-header-fixed ui-page-active">
			<div class="ui-header ui-header-fixed slidedown ui-bar-inherit">
				<a href="#" class="back_home ui-btn-left ui-btn ui-icon-home ui-btn-icon-notext ui-shadow ui-corner-all">主页面</a>
      		    <h1 style="width:70%;margin:0 auto;"  class="ui-title">绩效统计</h1>
      	     </div>

            <table width="90%" border="0" height="52" style="margin-left:20px">
                <tr>
                    <td class="yizhu_baiyao_shaixuan_input" style="width:40%">
                        <input type="text" name="tizheng_input_time" id="tongji_start_date" value="" data-role="none" style="text-align:center;">
                    </td>
                    <td class="" style="width:5%;">
                        至
                    </td>
                    <td class="yizhu_baiyao_shaixuan_input" style="width:40%">
                        <input type="text" name="tizheng_input_time" id="tongji_end_date" value="" data-role="none" style="text-align:center;">
                    </td>
                    <td style="text-align:right;">
                        <input type="button" value="查询" id="tongji_submit" class="search_button jiancha_search yizhu_search" data-role="none" style="margin-left:0px;"/>
                    </td>
                </tr>
            </table>

            <div data-role="content" class="content ui-content">
                <div class="yizhu_list_content" style="">

                </div>
            </div>

            <div style=" position:fixed; top:0px; bottom:0px; left:0px; right:0px; background-color:#000; z-index:999; height:90%; filter:alpha(opacity=90,Style=3);-moz-opacity:0.9;-khtml-opacity: 0.9;opacity: 0.9; display:none;" id="yizhu_dialog">
                <div class="yizhu_dialog" data-theme="a">
                    <div class="yizhu_dialog_title" data-theme="a"></div>
                    <div class="yizhu_dialog_content"></div>
                    <div class="yizhu_dialog_button"></div>
                </div>
            </div>

            <script>
                $(function(){
                    document_type_global = "huliTongji";
                    $("#tongji_submit").die().live("click",function(){
                        getGerenTongjiList($("#tongji_start_date").val(),$("#tongji_end_date").val());
                    });

                    $(".back_home").die().live("click",function(){
                        window.location.href="../System/showMobileSystem.html";
                    });
                });

                // 根据条件获取医嘱列表数据
                function getGerenTongjiList(start_date,end_date)
                {
                    // setHeader();
                    $.ajax({
                        type: "get",
                        async: true,
                        url:server_url+"Mobile/HuliTongji/getGerenTongjiListJson"+yiyuan_id,
                        data: { user_number:nurse_info_global.user_number,start_date:start_date,end_date:end_date},
                        dataType: "jsonp",
                        jsonp: "callbackGetGerenTongjiListJson",
                        jsonpCallback:"feedBackStateGetGerenTongjiListJson",
                        error:function(mes)
                        {
                            alert(mes);
                        },
                        beforeSend: loading,
                        success: function(result) {
                            if(result.ret=="success")
                            {
                                var tongji_list = result.data;
                                var str_html = '<table class="yizhu_one_group" style="width:90%">'+
                                                '<tr class="yizhu_one">'+
                                                    '<td class="yizhu_left">项目</td>'+
                                                    '<td class="yizhu_right">次数</td>'+
                                                '</tr>'+
                                            '</table>'+
                                            '<hr/>';
								if(tongji_list!=null)
								{
									for(var i=0;i<tongji_list.length;i++)
									{
										str_html += '<table class="yizhu_one_group" style="width:90%">';
										str_html += '<tr class="yizhu_one">'+
														'<td class="yizhu_left">'+tongji_list[i].item_name+'次数</td>'+
														'<td class="yizhu_right">'+tongji_list[i].count+'</td>'+
													'</tr>';
										str_html += '</table>'+
											'<hr/>';

									}

								}

                                $(".yizhu_list_content").html(str_html);
                                /*加载loding消失*/
                                $('#m').remove();
                                $('#lo').remove();
                                /*end*/
                            }
                            else
                            {
                                alert(result.msg);
                            }
                        }
                    });
                }

                // 重写时间控件
                function selectInputTime_tongji(){
                var opt = {theme:'android-ics light',mode:'scroller',display:'modal',lang:'zh',dateFormat: 'yy-mm-dd',setText: '确定',cancelText: '取消',dateOrder: 'yymmdd',dayText: '日', monthText: '月', yearText: '年',endYear:2020, startYear:2000};
                    opt.date = {preset : 'date'};//日期
                    opt.time = {preset : 'time'};//时间
                    opt.datetime = { preset : 'date', minDate: new Date(2012,3,10,9,22), maxDate: new Date(2020,01,01,15,44), stepMinute: 5  };
                //日期+时间
                opt.select = {preset : 'select'};//下拉框
                $('input[name="tizheng_input_time"]').val('').scroller('destroy').scroller($.extend(opt['datetime'],opt));

                var nowdate = getCurrentDate();
                $('input[name="tizheng_input_time"]').val(nowdate);

                //时间更改
                $('input[name="tizheng_input_time"]').live("click",function(){
                    var opt = {theme:'android-ics light',mode:'scroller',display:'modal',lang:'zh',dateFormat: 'yy-mm-dd',setText: '确定',cancelText: '取消',dateOrder: 'yymmdd',dayText: '日', monthText: '月', yearText: '年',endYear:2020, startYear:2000
                    };
                    opt.date = {preset : 'date'};//日期
                    opt.time = {preset : 'time'};//时间
                    opt.datetime = { preset : 'date', minDate: new Date(2012,3,10,9,22), maxDate: new Date(2020,01,01,15,44), stepMinute: 5  };//日期+时间
                    opt.select = {preset : 'select'};//下拉框
                    $(this).val('').scroller('destroy').scroller($.extend(opt['datetime'],opt));
                });
            }
			function refreshData()
			{
				 //设置时间选择框，为其添加控件
                    selectInputTime_tongji();
                    // 获取默认数据
                    getGerenTongjiList($("#tongji_start_date").val(),$("#tongji_end_date").val());

				$(".ui-page").show();
				$(".ui-page").show(function(){$(document).trigger('mouseover')});
			}
            </script>
        </div>
	</body>
</html>
